#ifndef GRITC_SCENE_PICK_HPP
#define GRITC_SCENE_PICK_HPP

#include <gritc/math/vec.hpp>

namespace gritc { namespace scene {

	struct pick_node_
	{
		template
			<	class Node
			,	class Bounds
			,	class Container >
			void operator () 
			(	Node & node_
			,	Bounds & bounds_
			,	Container & results_ ) const
		{
			pick(node_,bounds_,results_);
		}
	} const pick_node;

	template<class Real>
	struct ray
	{
		typedef gritc::math::vec<3,Real> vec_type;
		vec_type o, d;
	};

	template<class Traits>
	struct ray_pick : Traits::visitor_type::function
	{
		typedef typename Traits::visitor_type visitor_type;
		typedef typename Traits::real_type real_type;
		typedef ray<real_type> ray_type;
		typedef gritc::math::vec<3,real_type> result_type;
		typedef std::list<result_type> result_list;

		result_list results_;
		ray_type bounds_;

		template<class Node>
		void operator () (Node & node_)
		{
			pick_node(node_,bounds_,results_);
		}
	};

	template<class Traits, class Bounds, class Container>
	void pick(basic_scene<Traits> & scene_, Bounds & bounds_, Container & results_)
	{
		int x = 0;
		x ++;
	}
}}

#endif